<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>模板管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">
    <script type="text/javascript" src='../../js/jquery.min.js'></script>
    <script type="text/javascript" src='../layui/layui.all.js'></script>
    <script type="text/javascript" src="../base/common.js"></script>
    <script type="text/javascript" src="../../js/commonutil.js"></script>
    <script src="../../js/xadmin.js" type="text/javascript"></script>
    <script type="text/javascript" src='../base/bs.js'></script>
    <script type="text/javascript" src="template.js"></script>

</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md9" style="width:100%;height:100%">
            <div class="layui-row">
                <div style="background-color: #fff">
                    <div class="layui-row " style="background-color: #f2f2f2; height: 40px;line-height: 40px">
                        <span>
                            <i class="layui-icon layui-icon-note"></i>
                            筛选查询
                        </span>
                        <span style="float: right; margin-right: 30px">
                            <span class="up" onclick="query_search()">
                                <i id = "up" class="layui-icon layui-icon-up  "></i>
                               <!-- <i id = "down" style="display: none" class="layui-icon layui-icon-down"></i>-->
                                收起筛选
                            </span>
                            <button class="" style="margin-left: 10px"></button>
                             <button lay-filter='sc-query-form' class='bs-button-query' type='button'>筛选结果</button>
                        </span>
                        </div>

                    </div>
                    <form id="product-query-form" class="layui-form bs-query-form"></form>

                </div>
                <div style="background-color: #fff">
                    <div class="layui-btn-group">
                        <button class="layui-btn layui-button-create " onclick="newTemplate()" >新增模板</button>
                        <button class = "layui-btn layui-btn-sm" onclick = createAudit() > 配置审批流 </button>
                        <!--<button class = "layui-btn layui-btn-sm" lay-event = "create" > 新增模板 </button>
                        <button class = "layui-btn layui-btn-sm" lay-event = "createAudit" > 配置审批流 </button>-->
                        <!--<button class="layui-btn layui-btn-danger bs-button-batch-delete">删除</button>-->
                    </div>
                    <table id="tableDiv" lay-filter="tableDiv"></table>
                    <div id="pageDiv"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="bar">
    <a class="layui-btn layui-btn-sm" lay-event="view">预览</a>

    {{#  if(d.approvalUser){ }}
    <a class="layui-btn layui-btn-sm " lay-event="allow">审批</a>
    {{#  } else { }}
    <button class="layui-btn layui-btn-sm layui-btn-disabled " >审批</button>
    {{#  } }}

    {{#  if(d.vip== "普通"){ }}
    <a class="layui-btn layui-btn-sm " lay-event="beVip">vip</a>
    {{#  } else { }}
    <a class="layui-btn layui-btn-sm  " lay-event="notVip" >普通</a>
    {{#  } }}


    <!-- 这里同样支持 laytpl 语法，如： -->
    {{#  if(d.templateStatus == "启用"){ }}
    <a class="layui-btn layui-btn-sm" lay-event="disable">启停</a>
    {{# } else {}}
    {{#  if(d.auditStatus == "已开通"){ }}
    <a class="layui-btn layui-btn-sm" lay-event="enable">启停</a>
    {{# } else {}}
    <button class="layui-btn layui-btn-sm layui-btn-disabled" disabled >启停</button>
    {{#  } }}
    {{#  } }}
    <a class="layui-btn layui-btn-sm" lay-event="download">下载</a>

</script>

</body>
</html>
